package com.tx.review.enumuation;

public enum Day1 {
    //相当于我本类维持了对象的创建
    MONDAY("星期一"){
        @Override
        public String getInfo() {
            return "111";
        }
    }, //相当于调用了 new Day1("星期一")
    TUESDAY("星期二"){
        @Override
        public String getInfo() {
            return "222";
        }
    },
    WEDNESDAY("星期三"){
        @Override
        public String getInfo() {
            return "333";
        }
    },
    THURSDAY("星期四") {
        @Override
        public String getInfo() {
            return "444";
        }
    },
    FRIDAY("星期五") {
        @Override
        public String getInfo() {
            return "555";
        }
    },
    SATURDAY("星期六") {
        @Override
        public String getInfo() {
            return "666";
        }
    },
    SUNDAY("星期日") {
        @Override
        public String getInfo() {
            return "777";
        }
    }; //要用分号分割

    /*MONDAY,
    TUESDAY,
    WEDNESDAY,
    THURSDAY,
    FRIDAY,
    SATURDAY,
    SUNDAY;*/

    private String content;

    Day1(String content) {
        this.content = content;
    }

    public String getContent(){
        return this.content;
    }

    @Override
    public String toString() {
        return "Day1{" +
                "content='" + content + '\'' +
                '}';
    }

    public abstract String getInfo();
}
